/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mvp.levelup.oop2.main;

import mvp.levelup.oop2.Employee;
import mvp.levelup.oop2.IWeapon;
import mvp.levelup.oop2.Person;
import mvp.levelup.oop2.Player;
import mvp.levelup.oop2.User;
import mvp.levelup.oop2.WeaponCreator;
import mvp.levelup.oop2.Weapons;

/**
 *
 * @author WORKSPOT2
 */
public class Main
{

    public static void main(String[] args)
    {
        User u1 = new User(1, "Vasya");
        User u2 = new User(2, "Petya");
        System.out.println("User 1 company: " + User.COMPANY);
        System.out.println("User 2 company: " + User.COMPANY);
        User.COMPANY = "LuX-Soft";
        System.out.println("User 1 company: " + User.COMPANY);
        System.out.println("User 2 company: " + User.COMPANY);

        Person p1 = new Employee(2333, "Best", "Vasya", "The Employee", 1);
        Person p2 = new Player("Dasha", "The Person", 0, 100);

        Person[] persons =
        {
            p1, p2
        };

        for (int i = 0; i < persons.length; i++)
        {
            persons[i].beHappyMan();
        }

        IWeapon bow = WeaponCreator.createWeapon(Weapons.BOW);
        System.out.println("Name: " + bow.getName());
        IWeapon sword = WeaponCreator.createWeapon(Weapons.SWORD);
        System.out.println("Name: " + sword.getName());
        IWeapon[] weapons =
        {
            bow, sword
        };

        for (int i = 0; i < weapons.length; i++)
        {
            weapons[i].breakUp();
        }

    }
}
